package com.lifesaftypower.product;

import java.io.Serializable;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class Product implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String TAG = "product";
	private String _agent_url;
	private String _cad_file_url;
	private String _datasheet_url;
	private String _enclosure;
	private String _installation_manual_url;
	private String _model;
	private String _power;
	private String _size;
	private String _voltage;

	public Product(Node xmlNode) {
		if (xmlNode.getNodeType() == Node.ELEMENT_NODE) {
			Element elem = (Element) xmlNode;
			_agent_url = elem.getAttribute("agent_url");
			_cad_file_url = elem.getAttribute("cad_file_url");
			_datasheet_url = elem.getAttribute("datasheet_url");
			_enclosure = elem.getAttribute("enclosure");
			_installation_manual_url = elem
					.getAttribute("installation_manual_url");
			_model = elem.getAttribute("model");
			_power = elem.getAttribute("power");
			_size = elem.getAttribute("size");
			_voltage = elem.getAttribute("voltage");
		}
	}

	public Product(String _model, String _enclosure, String _voltage,
			String _power, String _size, String _datasheet_url,
			String _installation_manual_url, String _cad_file_url,
			String _agent_url) {

		this._model = _model;
		this._enclosure = _enclosure;
		this._voltage = _voltage;
		this._power = _power;
		this._size = _size;
		this._datasheet_url = _datasheet_url;
		this._installation_manual_url = _installation_manual_url;
		this._cad_file_url = _cad_file_url;
		this._agent_url = _agent_url;
	}

	public String get_agent_url() {
		return _agent_url;
	}

	public String get_cad_file_url() {
		return _cad_file_url;
	}

	public String get_datasheet_url() {
		return _datasheet_url;
	}

	public String get_enclosure() {
		return _enclosure;
	}

	public String get_installation_manual_url() {
		return _installation_manual_url;
	}

	public String get_model() {
		return _model;
	}

	public String get_power() {
		return _power;
	}

	public String get_size() {
		return _size;
	}

	public String get_voltage() {
		return _voltage;
	}

	@Override
	public String toString() {
		return "Product [_agent_url=" + _agent_url + ", _cad_file_url="
				+ _cad_file_url + ", _datasheet_url=" + _datasheet_url
				+ ", _enclosure=" + _enclosure + ", _installation_manual_url="
				+ _installation_manual_url + ", _model=" + _model + ", _power="
				+ _power + ", _size=" + _size + ", _voltage=" + _voltage + "]";
	}

}
